From: | David McMinn |
Date: | 23 May 2001 at 12:24:36 |
Subject: | Re: BlitzII - Question of logic? |
Hi Tony
> > var.w = 23131
> > pn$="ExternalProg_"+Ustr$(var)+".exe"
> > Execute_ &pn$,0,0
> >
> > Although you've then got the problem of getting a return value from
> > the external program. You could maybe set and ENV-var I suppose.
> >
> You also have the problem of passing data to the program in the
> first place.
Not really, just do pn$="ExternalProg_"+Ustr$(var)+".exe "+arg$ I think.
And if not, you can change the input and output streams (which I suppose
would mean having to create a file somewhere as you mention below).
> Actually, these are the same problem, really - pop a file into ram?,
> must be a better way?
They are different problems, since it's far easier to pass parameters.
And if you're external programs are written in Blitz, it's difficult to
create a proper return code. It may be worth using SystemTagList_ as you
get more control and proper return codes.
> What happens if the program doesn't exist? Can you get a clean
> "executable not found" or "file not executable" response from the
> OS?
If the program cannot be found, Execute_ returns 0 (it might also return
0 in the case of not executable, or it cannot execute for some other
reason).
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie